
		

-- D:\GOA\reslibrary\templete\res\modal\modalmgr.xsl 58
gr_module("gm_xinbanchunzhongyun")


mcgfwagemgr = inherit(GmSql.list,GmBase.CallBack):name("mcgfwagemgr")



mcgfwagemgr.init = function (self,pagecount)

	local top = self
	
	
	GmSql.list.init(self,gInfo["path"]..'/'..g_local_db_name,'czy_wage')
	GmBase.CallBack.init(self)
	
	self.baseurl = ''

	self.idPair = {}
	self.idPair['prev'] = '0'
	self.idPair['next'] = '0'
	
	self.pageCount = pagecount or 10
	self.totalPage = 0
	
	self:reset_maxminid('czy_wage','id')
	
	
	self.action = {}
	self.op  = {}
	
	
	
	-----------------------------
	self.action['cgfwageitem'] = {} 	
	-------
	self.op['cgfwageitem'] = function(postparam,ui)
	
		local net = GmBase.czynet.get_instance()		
		local newpostparam = {}
		local tbname,callbackey,newpostparam = net:cgfwageitem()
		for a,b in pairs(top.action['cgfwageitem']) do
			if postparam[a] ~= nil then
				newpostparam[a] = postparam[a]
			end
		end
		net:add_callback(callbackey,ui)	
		local tb,callbackey = net:cgfwageitem(newpostparam)
		
	end	
		
  self.action['cgfwageitem']['id'] = { ['title'] = '编号' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwageitem']['user_id'] = { ['title'] = 'user_id' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwageitem']['name'] = { ['title'] = '名称' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfwageitem']['yuexin'] = { ['title'] = 'yuexin' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwageitem']['gongzi'] = { ['title'] = 'gongzi' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwageitem']['zhiwu'] = { ['title'] = 'zhiwu' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwageitem']['nianjia'] = { ['title'] = 'nianjia' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwageitem']['jiaban'] = { ['title'] = 'jiaban' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwageitem']['shisu'] = { ['title'] = 'shisu' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwageitem']['quanqin'] = { ['title'] = 'quanqin' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwageitem']['baoxian'] = { ['title'] = 'baoxian' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwageitem']['other'] = { ['title'] = 'other' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwageitem']['queqin'] = { ['title'] = 'queqin' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwageitem']['queqin_day'] = { ['title'] = 'queqin_day' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '20' }	
  self.action['cgfwageitem']['ticheng'] = { ['title'] = 'ticheng' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwageitem']['jixiao'] = { ['title'] = 'jixiao' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwageitem']['yanfa'] = { ['title'] = 'yanfa' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwageitem']['yingfae'] = { ['title'] = 'yingfae' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwageitem']['geshui'] = { ['title'] = 'geshui' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwageitem']['shifae'] = { ['title'] = 'shifae' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwageitem']['month'] = { ['title'] = 'month' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfwageitem']['update_time'] = { ['title'] = 'update_time' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '20' }
  self.action['cgfwageitem']['list_source'] = { ['title'] = '' ,['t'] = 's' , ['max'] = 50 }
	
	-----------------------------
	self.action['cgfwagelist'] = {} 	
	-------
	self.op['cgfwagelist'] = function(postparam,ui)
	
		local net = GmBase.czynet.get_instance()		
		local newpostparam = {}
		local tbname,callbackey,newpostparam = net:cgfwagelist()
		for a,b in pairs(top.action['cgfwagelist']) do
			if postparam[a] ~= nil then
				newpostparam[a] = postparam[a]
			end
		end
		net:add_callback(callbackey,ui)	
		local tb,callbackey = net:cgfwagelist(newpostparam)
		
	end	
		
  self.action['cgfwagelist']['id'] = { ['title'] = '编号' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwagelist']['user_id'] = { ['title'] = 'user_id' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwagelist']['name'] = { ['title'] = '名称' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfwagelist']['yuexin'] = { ['title'] = 'yuexin' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwagelist']['gongzi'] = { ['title'] = 'gongzi' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwagelist']['zhiwu'] = { ['title'] = 'zhiwu' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwagelist']['nianjia'] = { ['title'] = 'nianjia' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwagelist']['jiaban'] = { ['title'] = 'jiaban' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwagelist']['shisu'] = { ['title'] = 'shisu' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwagelist']['quanqin'] = { ['title'] = 'quanqin' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwagelist']['baoxian'] = { ['title'] = 'baoxian' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwagelist']['other'] = { ['title'] = 'other' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwagelist']['queqin'] = { ['title'] = 'queqin' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwagelist']['queqin_day'] = { ['title'] = 'queqin_day' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '20' }	
  self.action['cgfwagelist']['ticheng'] = { ['title'] = 'ticheng' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwagelist']['jixiao'] = { ['title'] = 'jixiao' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwagelist']['yanfa'] = { ['title'] = 'yanfa' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwagelist']['yingfae'] = { ['title'] = 'yingfae' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwagelist']['geshui'] = { ['title'] = 'geshui' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwagelist']['shifae'] = { ['title'] = 'shifae' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwagelist']['month'] = { ['title'] = 'month' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfwagelist']['update_time'] = { ['title'] = 'update_time' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '20' }
  self.action['cgfwagelist']['list_source'] = { ['title'] = '' ,['t'] = 's' , ['max'] = 50 }
	
	-----------------------------
	self.action['cgfwagepost'] = {} 	
	-------
	self.op['cgfwagepost'] = function(postparam,ui)
	
		local net = GmBase.czynet.get_instance()		
		local newpostparam = {}
		local tbname,callbackey,newpostparam = net:cgfwagepost()
		for a,b in pairs(top.action['cgfwagepost']) do
			if postparam[a] ~= nil then
				newpostparam[a] = postparam[a]
			end
		end
		net:add_callback(callbackey,ui)	
		local tb,callbackey = net:cgfwagepost(newpostparam)
		
	end	
		
  self.action['cgfwagepost']['id'] = { ['title'] = '编号' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwagepost']['user_id'] = { ['title'] = 'user_id' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwagepost']['name'] = { ['title'] = '名称' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfwagepost']['yuexin'] = { ['title'] = 'yuexin' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwagepost']['gongzi'] = { ['title'] = 'gongzi' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwagepost']['zhiwu'] = { ['title'] = 'zhiwu' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwagepost']['nianjia'] = { ['title'] = 'nianjia' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwagepost']['jiaban'] = { ['title'] = 'jiaban' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwagepost']['shisu'] = { ['title'] = 'shisu' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwagepost']['quanqin'] = { ['title'] = 'quanqin' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwagepost']['baoxian'] = { ['title'] = 'baoxian' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwagepost']['other'] = { ['title'] = 'other' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwagepost']['queqin'] = { ['title'] = 'queqin' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwagepost']['queqin_day'] = { ['title'] = 'queqin_day' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '20' }	
  self.action['cgfwagepost']['ticheng'] = { ['title'] = 'ticheng' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwagepost']['jixiao'] = { ['title'] = 'jixiao' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwagepost']['yanfa'] = { ['title'] = 'yanfa' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwagepost']['yingfae'] = { ['title'] = 'yingfae' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwagepost']['geshui'] = { ['title'] = 'geshui' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwagepost']['shifae'] = { ['title'] = 'shifae' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwagepost']['month'] = { ['title'] = 'month' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfwagepost']['update_time'] = { ['title'] = 'update_time' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '20' }
  self.action['cgfwagepost']['list_source'] = { ['title'] = '' ,['t'] = 's' , ['max'] = 50 }
	
	-----------------------------
	self.action['cgfwagedetail'] = {} 	
	-------
	self.op['cgfwagedetail'] = function(postparam,ui)
	
		local net = GmBase.czynet.get_instance()		
		local newpostparam = {}
		local tbname,callbackey,newpostparam = net:cgfwagedetail()
		for a,b in pairs(top.action['cgfwagedetail']) do
			if postparam[a] ~= nil then
				newpostparam[a] = postparam[a]
			end
		end
		net:add_callback(callbackey,ui)	
		local tb,callbackey = net:cgfwagedetail(newpostparam)
		
	end	
		
  self.action['cgfwagedetail']['id'] = { ['title'] = '编号' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwagedetail']['user_id'] = { ['title'] = 'user_id' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwagedetail']['name'] = { ['title'] = '名称' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfwagedetail']['yuexin'] = { ['title'] = 'yuexin' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwagedetail']['gongzi'] = { ['title'] = 'gongzi' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwagedetail']['zhiwu'] = { ['title'] = 'zhiwu' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwagedetail']['nianjia'] = { ['title'] = 'nianjia' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwagedetail']['jiaban'] = { ['title'] = 'jiaban' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwagedetail']['shisu'] = { ['title'] = 'shisu' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwagedetail']['quanqin'] = { ['title'] = 'quanqin' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwagedetail']['baoxian'] = { ['title'] = 'baoxian' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwagedetail']['other'] = { ['title'] = 'other' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwagedetail']['queqin'] = { ['title'] = 'queqin' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwagedetail']['queqin_day'] = { ['title'] = 'queqin_day' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '20' }	
  self.action['cgfwagedetail']['ticheng'] = { ['title'] = 'ticheng' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwagedetail']['jixiao'] = { ['title'] = 'jixiao' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwagedetail']['yanfa'] = { ['title'] = 'yanfa' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwagedetail']['yingfae'] = { ['title'] = 'yingfae' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwagedetail']['geshui'] = { ['title'] = 'geshui' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwagedetail']['shifae'] = { ['title'] = 'shifae' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwagedetail']['month'] = { ['title'] = 'month' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfwagedetail']['update_time'] = { ['title'] = 'update_time' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '20' }
  self.action['cgfwagedetail']['list_source'] = { ['title'] = '' ,['t'] = 's' , ['max'] = 50 }
	
	-----------------------------
	self.action['cgfwagemodify'] = {} 	
	-------
	self.op['cgfwagemodify'] = function(postparam,ui)
	
		local net = GmBase.czynet.get_instance()		
		local newpostparam = {}
		local tbname,callbackey,newpostparam = net:cgfwagemodify()
		for a,b in pairs(top.action['cgfwagemodify']) do
			if postparam[a] ~= nil then
				newpostparam[a] = postparam[a]
			end
		end
		net:add_callback(callbackey,ui)	
		local tb,callbackey = net:cgfwagemodify(newpostparam)
		
	end	
		
  self.action['cgfwagemodify']['id'] = { ['title'] = '编号' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwagemodify']['user_id'] = { ['title'] = 'user_id' , ['t'] = 'n' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwagemodify']['name'] = { ['title'] = '名称' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfwagemodify']['yuexin'] = { ['title'] = 'yuexin' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwagemodify']['gongzi'] = { ['title'] = 'gongzi' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwagemodify']['zhiwu'] = { ['title'] = 'zhiwu' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwagemodify']['nianjia'] = { ['title'] = 'nianjia' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwagemodify']['jiaban'] = { ['title'] = 'jiaban' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwagemodify']['shisu'] = { ['title'] = 'shisu' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwagemodify']['quanqin'] = { ['title'] = 'quanqin' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwagemodify']['baoxian'] = { ['title'] = 'baoxian' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwagemodify']['other'] = { ['title'] = 'other' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwagemodify']['queqin'] = { ['title'] = 'queqin' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwagemodify']['queqin_day'] = { ['title'] = 'queqin_day' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '20' }	
  self.action['cgfwagemodify']['ticheng'] = { ['title'] = 'ticheng' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwagemodify']['jixiao'] = { ['title'] = 'jixiao' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwagemodify']['yanfa'] = { ['title'] = 'yanfa' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwagemodify']['yingfae'] = { ['title'] = 'yingfae' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwagemodify']['geshui'] = { ['title'] = 'geshui' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwagemodify']['shifae'] = { ['title'] = 'shifae' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '11' }	
  self.action['cgfwagemodify']['month'] = { ['title'] = 'month' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '255' }	
  self.action['cgfwagemodify']['update_time'] = { ['title'] = 'update_time' , ['t'] = 's' , ['min'] = 'NaN' , ['max'] = '20' }
  self.action['cgfwagemodify']['list_source'] = { ['title'] = '' ,['t'] = 's' , ['max'] = 50 }
	
  
 
  	
  
	self.session = {}
	
end   





mcgfwagemgr.check_fields_validate = function(self,key,postparam)
	local checkfunc = {}
	checkfunc['t'] = function(fm,value)
		return true
	end
	checkfunc['min'] = function(fm,value)
		if string.len(value) < tonumber(fm) then
			return false
		end
		return true
	end
	checkfunc['max'] = function(fm,value)
		if string.len(value) > tonumber(fm) then
			return false
		end
		return true
	end
	local format = self.action[key]
	for fkey,fvalue in pairs(postparam) do
		if format[fkey] ~= nil then
			for fmkey,fmvalue in pairs(format[fkey]) do
				if checkfunc[fmkey] ~= nil then
					if checkfunc[fmkey](fmvalue,fvalue) == false then
						return false,tostring(format[fkey]['title']).." "..tostring(fmkey).." "..tostring(fmvalue).." error"
					end
				end
			end
		end
	end
	return true,""
end 


 
mcgfwagemgr.get_session = function(self,key)
	if key == nil then
		key = 'default'
	end
	return self.session[key]
end

mcgfwagemgr.has_session = function(self,key)
	if key == nil then
		key = 'default'
	end
	return self.session[key] ~= nil
end
 
 
mcgfwagemgr.add_session = function(self,key,ses)
	self.session[key] = ses
end


mcgfwagemgr.add_ui = function(self,key,ui)
	self.uis[key] = ui
end




-- todo
mcgfwagemgr.run = function(self,key,ui)
	if self.action[key] ~= nil and self.op[key] ~= nil then
		local tb = {}
		for k,v in pairs(self.action[key]) do
			if ui[k] ~= nil and type(ui[k]) == 'table' and ui[k].get_text then
				tb[k] = ui[k]:get_text()
			else
				print('run error',key,k)
			end
		end
		local success,msg = self:check_fields_validate(key,tb)
		if success then
			self.op[key](tb,ui)
		else
			ui.hostWindow:showMsg(msg)
		end		
	else
		print('run error self.action',key)
	end
end


------------------------------------------------------------------------------------


mcgfwagemgr.get_net_page = function(self,netmethon,attrs)
	local top = self	
	local discuz = GmBase.net.get_instance()
	local methon = netmethon
	if methon ~= nil and discuz[methon] then
		print('mcgfwagemgr.get_net_page ',methon)
		local tbname,callbackey,tb = discuz[netmethon](discuz)
		for k,v in pairs(attrs) do
			tb[k] = attrs[k]
		end
		discuz[netmethon](discuz,tb)
	else
		print('mcgfwagemgr.get_net_page error ',methon)
	end		
end




mcgfwagemgr.get_prev_page = function(self,ui,callback)
	if ui.page ~= nil and type(ui.page) == 'number' then
		local uiattrs = ui:GetAttrs()
		local attrs = {}
		for a,b in pairs(self.action['cgfwagelist']) do
			if type(uiattrs[a]) ~= nil then
				attrs[a] = uiattrs[a]
			end
		end
		attrs.page = ui.page - 1		

		if attrs.page < 1 then
			attrs.page = 1
		end

		self:get_net_page(ui.netmethon,attrs)
	end
end


mcgfwagemgr.get_next_page = function(self,ui,callback)
	if ui.page ~= nil and type(ui.page) == 'number' then
		local uiattrs = ui:GetAttrs()
		local attrs = {}
		for a,b in pairs(self.action['cgfwagelist']) do
			if type(uiattrs[a]) ~= nil then
				attrs[a] = uiattrs[a]
			end
		end
		attrs.page = ui.page + 1
		self:get_net_page(ui.netmethon,attrs)
	end
end

------------------------------------------------------------------------------------



mcgfwagemgr.init_table = function(self)
	--[[
	local tablefield = {}
	
	--number
	tablefield['id'] = { ["i"] = 11, }
    
	--number
	tablefield['user_id'] = { ["i"] = 11, }
    
	--string
	tablefield['name'] = { ["v"] = 255, }
    
	--string
	tablefield['yuexin'] = { ["v"] = 11, }
    
	--string
	tablefield['gongzi'] = { ["v"] = 11, }
    
	--string
	tablefield['zhiwu'] = { ["v"] = 11, }
    
	--string
	tablefield['nianjia'] = { ["v"] = 11, }
    
	--string
	tablefield['jiaban'] = { ["v"] = 11, }
    
	--string
	tablefield['shisu'] = { ["v"] = 11, }
    
	--string
	tablefield['quanqin'] = { ["v"] = 11, }
    
	--string
	tablefield['baoxian'] = { ["v"] = 11, }
    
	--string
	tablefield['other'] = { ["v"] = 11, }
    
	--string
	tablefield['queqin'] = { ["v"] = 11, }
    
	--string
	tablefield['queqin_day'] = { ["v"] = 20, }
    
	--string
	tablefield['ticheng'] = { ["v"] = 11, }
    
	--string
	tablefield['jixiao'] = { ["v"] = 11, }
    
	--string
	tablefield['yanfa'] = { ["v"] = 11, }
    
	--string
	tablefield['yingfae'] = { ["v"] = 11, }
    
	--string
	tablefield['geshui'] = { ["v"] = 11, }
    
	--string
	tablefield['shifae'] = { ["v"] = 11, }
    
	--string
	tablefield['month'] = { ["v"] = 255, }
    
	--string
	tablefield['update_time'] = { ["v"] = 20, }
    
	self:create_table( self.tablename, tablefield)
	]]
	self:initTableStruct()
end


	